import { data } from 'jquery'

export const tableMixin = {
  data() {
    return {
      data: [], // 这里应该是从后端获取的数据
      pagination: {
        current: 1,
        total: 1, 
        pageSize: 10,
      },
    }
  },
  methods: {
    handleTableChange(pagination, filters, sorter) {
      console.log(pagination)
      const pager = { ...this.pagination }
      pager.current = pagination.current
      this.pagination = pager
      console.log(pager)
      this.getData()
    },
  },
}
export const tableImgMixin = {
  data() {
    return {
      imgBase: window._CONFIG['staticDomainURL'],
    }
  },
  methods: {
    getImgList(v) {
      if (v) return v.split(',')
      return [v]
    },
  },
}
